package com.slz3.business.module.configManagement.conFeedback.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.configManagement.conFeedback.domain.ConFeedback;
import com.slz3.business.module.configManagement.conFeedback.domain.ConFeedbackCondition;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class ConFeedbackResAtomic extends ConFeedbackResExecutor {

    public Mono<ServerResponse> add_$ConFeedbackUpdateLock(ServerRequest req, ConFeedback conFeedback) {
        return ConFeedbackResSafeValid.add(req, conFeedback) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.add(req, conFeedback);
    }

    public Mono<ServerResponse> delete_$ConFeedbackUpdateLock(ServerRequest req, ConFeedbackCondition conFeedbackCondition) {
        return ConFeedbackResSafeValid.delete(req, conFeedbackCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.delete(req);
    }

    public Mono<ServerResponse> modify_$ConFeedbackUpdateLock(ServerRequest req, ConFeedback conFeedback) {
        return ConFeedbackResSafeValid.modify(req, conFeedback) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.modify(req, conFeedback);
    }

    public Mono<ServerResponse> info_$ConFeedbackUpdateLock(ServerRequest req) {
        return ConFeedbackResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.info(req);
    }

    public Mono<ServerResponse> auditSubmit_$ConFeedbackUpdateLock(ServerRequest req, ConFeedbackCondition conFeedbackCondition) {
        return ConFeedbackResSafeValid.auditSubmit(req, conFeedbackCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditSubmit(req);
    }

    public Mono<ServerResponse> audit_$ConFeedbackUpdateLock(ServerRequest req, ConFeedbackCondition conFeedbackCondition) {
        return ConFeedbackResSafeValid.audit(req, conFeedbackCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.audit(req);
    }

    public Mono<ServerResponse> auditReject_$ConFeedbackUpdateLock(ServerRequest req, ConFeedbackCondition conFeedbackCondition) {
        return ConFeedbackResSafeValid.auditReject(req, conFeedbackCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditReject(req);
    }


    public Mono<ServerResponse> usingEnable_$ConFeedbackUpdateLock(ServerRequest req, ConFeedbackCondition conFeedbackCondition) {
        return ConFeedbackResSafeValid.usingEnable(req, conFeedbackCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingEnable(req);
    }

    public Mono<ServerResponse> usingDisable_$ConFeedbackUpdateLock(ServerRequest req, ConFeedbackCondition conFeedbackCondition) {
        return ConFeedbackResSafeValid.usingDisable(req, conFeedbackCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingDisable(req);
    }
}
